import { TableItem, FetchTableDataParams, TableDataResponse } from './types';

const mockData: TableItem[] = [
  {
    id: 'GH-JC-2025030101',
    name: '2025年基础设施研发中心投产规划(2025-05-01-2025-06-30)',
    center: '基础设施研发中心',
    period: '2025.05.01-2025.06.30',
    submitter: '',
    submitTime: '',
    approveTime: '',
    status: '待提交'
  },
  {
    id: 'GH-PF-2025030101',
    name: '2025年批发应用研发中心投产规划(2025-05-01-2025-06-30)',
    center: '批发应用研发中心',
    period: '2025.05.01-2025.06.30',
    submitter: '朱文熙/YC02753',
    submitTime: '2025-03-03 14:46:41',
    approveTime: '2025-03-03 14:48:31',
    status: '审批通过'
  },
  {
    id: 'GH-LS-2025030101',
    name: '2025年零售应用研发中心投产规划(2025-05-01-2025-06-30)',
    center: '零售应用研发中心',
    period: '2025.05.01-2025.06.30',
    submitter: '',
    submitTime: '',
    approveTime: '',
    status: '无需申报'
  },
  {
    id: 'GH-JC-2025010101',
    name: '2025年基础设施研发中心投产规划(2025-03-01-2025-04-30)',
    center: '基础设施研发中心',
    period: '2025.03.01-2025.04.30',
    submitter: '朱文熙/YC02753',
    submitTime: '2025-03-03 16:19:57',
    approveTime: '2025-03-03 16:20:39',
    status: '审批通过'
  },
  {
    id: 'GH-JC-2024110101',
    name: '2024年基础设施研发中心投产规划(2025-01-01-2025-02-28)',
    center: '基础设施研发中心',
    period: '2025.01.01-2025.02.28',
    submitter: '朱文熙/YC02753',
    submitTime: '2025-03-25 16:00:15',
    approveTime: '2025-04-09 11:05:18',
    status: '审批不通过'
  },
  {
    id: 'GH-PF-2024090101',
    name: '2024年批发应用研发中心投产规划(2024-11-01-2024-12-31)',
    center: '批发应用研发中心',
    period: '2024.11.01-2024.12.31',
    submitter: '朱文熙/YC02753',
    submitTime: '2024-12-04 15:09:59',
    approveTime: '2025-01-20 10:35:35',
    status: '强行终止'
  },
];

export const fetchTableData = async (params: FetchTableDataParams): Promise<TableDataResponse> => {
  return new Promise((resolve) => {
    setTimeout(() => {
      resolve({
        list: mockData,
        total: 31,
        page: params.page,
        pageSize: params.pageSize
      });
    }, 500);
  });
}; 